<template>
  <!-- 支付成功提示模块 -->
  <view class="container">
    <view>
      <view class="success">支付成功！</view>
      <button class="back" @tap="back">
        返回首页
      </button>
    </view>
  </view>
</template>

<script setup>

import {onLoad} from "@dcloudio/uni-app";
import {ref} from "vue";

const billId = ref()
const shopID = ref()

onLoad((options) => {
  console.log("options--->>>", options)
  billId.value = options.bill_id
  shopID.value = options.shopId
})

const back = async () => {
  await uni.showLoading({title: "正在返回首页"})
  await uni.reLaunch({
    url: '/pages/business_order/order_list?shopId=' + shopID.value,
    complete: () => {
      uni.hideLoading()
    }
  });
}
const back1 = async() => {
  await uni.showLoading({title: "正在返回首页"})
  await uni.reLaunch({
    url: '/pages/business_order/order_detail?bill_id=' + billId.value + '&shopId=' + shopID.value,
    complete: () => {
      uni.hideLoading()
    }
  });
}

const back2 = async() => {
  await uni.navigateBack()
}
</script>


<style lang="scss" scoped>
.success {
  margin-top: 360rpx;
  font-size: 38rpx;
  text-align: center;
}

.back {
  border-radius: 300rpx;
  margin-top: 160rpx;
  margin-left: 60rpx;
  margin-right: 60rpx;
  color: white;
  text-align: center;
  background: linear-gradient(270deg, #58cea0 0%, #58cea0 100%);
}
</style>
